package com.dearbinge.data.api.orderTable;

import com.alibaba.fastjson.JSONObject;
import com.dearbinge.data.pojo.orderTable.OrderTable;
import com.dearbinge.utils.PageResult;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

public interface OrderTableService {
    Integer update(OrderTable orderTable);

    Integer insert(OrderTable orderTable);

    Integer delete(Integer id);

    PageResult<List<Object>> getPage(String messageSpecific ,String userType,String type ,String orderId , String userId, Integer orderStatus, Integer assessType,Integer isDeleted, Integer pageNo, Integer pageSize);
    /**
     * 根据订卖家id查询待评价的商品
     * @param userId
     * @param pageNo
     * @param pageSize
     * @return
     */
    PageResult<List<Object>> getCommodityByUserId(String userId , Integer pageNo, Integer pageSize);

    List<Object> getByUserId(String orderNum);
    /**
     * 根据订单号修改支付状态
     * @param orderNum
     * @param orderStatus
     * @return
     */
    Integer updateStatus(String orderNum, Integer orderStatus);
    /**
     * 确认发货
     * @param orderNum
     * @param orderStatus
     * @return
     */
    Integer deliverGoods(String expressNum,String orderNum,String orderCompanyCode,String orderStatus,String expressName);

    Map<String, String> getCommodityByOrderNo(String orderNum);
    /**
     * 根据微信订单号修改支付状态
     * @param orderNum
     * @param orderStatus
     * @return
     */
    Integer updateStatusByWechatNumber(String orderNum, Integer orderStatus);

    String addOrUpdate(JSONObject parseObject);

    /**
     * 根据微信订单编号返回订单的总价格
     * @param wechatNumber 微信订单编号
     * @return
     */
    BigDecimal selectTotalMonryByWechatNumber(String wechatNumber);
}
